import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import ECharts from 'vue-echarts'
import 'echarts/lib/chart/bar'
import 'echarts/lib/component/tooltip'
import 'echarts/lib/component/title'
import 'echarts/lib/component/legend'
import 'echarts/lib/component/legendScroll'//图例翻译滚动

import publicUtil from '@/utli/public.js'
import directive from '@/utli/directive.js'
import $ajax from '@/utli/ajax.js'


Vue.component('v-chart', ECharts);
Vue.directive('number-input', directive.numberInput);
Vue.directive('inserte-input', directive.inserteInput);
Vue.directive('inserte-input2', directive.inserteInput2);

Vue.use(ElementUI);

Vue.prototype.baseUrl=$ajax.baseUrl;
Vue.prototype.doExchange = publicUtil.doExchange;//双层数组组合成一层
Vue.prototype.encryptByEnDES = publicUtil.encryptByEnDES;//DES加密
Vue.prototype.uploadImageCheck = publicUtil.uploadImageCheck;
Vue.prototype.uploadVideoCheck = publicUtil.uploadVideoCheck;
Vue.prototype.formatNumber = publicUtil.formatNumber;
Vue.prototype.downloadFile=publicUtil.downloadFile;
Vue.prototype.$ajax = $ajax;
Vue.prototype.back=function(){
    history.back();
}
Vue.config.productionTip = false;
if (process.env.NODE_ENV == 'production') {
    Vue.config.devtools = false;
} else {
    Vue.config.devtools = true;
}

new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app')